package com.lb.service.impel;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lb.entity.Dish;
import com.lb.entity.Query;
import com.lb.mapper.dishMapper;
import com.lb.service.dishservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DishServiceimpel extends ServiceImpl<dishMapper, Dish> implements dishservice {
    @Autowired
    private dishMapper dishMapper;
    @Override
    public Page<Dish> getBypage(Query query) {
        Page<Dish> page=new Page<>();
        page.setCurrent(query.getPageNum());
        page.setSize(query.getPageSize());
        Page<Dish> page1 = dishMapper.selectPage(page, null);
        return page1;
    }
}
